/********************************/
/************ System ************/
/********************************/

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: arial, sans-serif;
    font-size: 14px;
    height: auto;
}

textarea, input { outline: none; }

input[type=text] {
    box-sizing: border-box;
    padding: 4px;
    appearance: none;
    height: 30px;
    vertical-align: middle;
    border: 1px solid #b9b9b9;
    border-radius: 2px;
    width: 100%;
}

    input[type=text]:hover {
        appearance: none;
        border: 1px solid #b9b9b9;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
    }

::-webkit-scrollbar{
    width:10px;
    height:10px;
    background-color:#fff;
}
    ::-webkit-scrollbar:hover{
        background-color:#eee;
    }

    ::-webkit-resizer{
        -webkit-border-radius:4px;
        background-color:#666;
    }

    ::-webkit-scrollbar-thumb{
        min-height:0.8em;
        min-width:0.8em;
        background-color: rgba(0, 0, 0, .2);
        box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset -1px -1px 0 rgba(0,0,0,.07);
    }
    ::-webkit-scrollbar-thumb:hover{
        background-color: #bbb;
    }

    ::-webkit-scrollbar-thumb:active{
        background-color:#888;
    }

/********************************/
/************ Views *************/
/********************************/

#loading, #firstTime, #mainScreen, #openNote {
    display: none;
}

#firstTime, #mainScreen {
    width: 400px;
}

/********************************/

#loading {
    width: 200px;
    height: 200px;
    background: url("../img/loader.gif") no-repeat center 40%;
    position:relative;
}

    #loading .msg{
        position: absolute;
        top: 65%;
        left: 50%;
        height: 30%;
        width: 50%;
        margin: -15% 0 0 -25%;
        text-align: center;
        font-size: 0.9em;
    }

/********************************/

#firstTime {
    padding: 10px
}

    #firstTime .title {
        color: #DD4B39;
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    #firstTime p {
        margin: 0;
        padding: 7px 0;
    }

    #firstTime .button {
        margin-top: 15px;
    }

/********************************/

#mainScreen {}

    #noteList {
        max-height:517px;
        overflow:auto;
        overflow-x:hidden;
        display: block;
        padding: 0 5px;
    }

    #noteList .noteListItem {
        display: block;
        border-bottom: 1px #E5E5E5 solid;
        white-space: nowrap;
        overflow: hidden;
        vertical-align: middle;
        padding: 0 5px;
    }

        #noteList .noteListItem:hover {
            cursor: pointer;
        }

        #noteList .noteListItem .date {
            padding-top: 10px;
            padding-bottom: 10px;
            float: right;
        }

        #noteList .noteListItem .docTitle {
            padding-top: 10px;
            padding-bottom: 10px;
            margin-right: 60px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

/********************************/

#openNote {}

    #openNote #inputTitle {
        background-color: #f1f1f1;
    }

        #openNote #inputTitle:focus, #openNote #inputTitle.new {
            border: 1px solid #b9b9b9;
            background-color: #fff;
        }

        #openNote #inputTitle.error, #openNote #inputTitle.error:focus, #openNote #inputTitle.new.error {
            border-color: #D14836;
        }

    #openNote #content {
        width: 100%;
        height: 100%;
        border: 0;
        margin: 0;
        padding: 5px;
        resize: none;
        white-space: nowrap;
        outline: none;
    }

    #openNote #lastMod {
        padding: 5px;
    }

/********************************/

#statusMsg {
    display: none;
    position: absolute;
    right: 0;
    bottom: 0;
    border: 1px solid #F0C36D;
    background-color: #F9EDBE;
    font-weight: bold;
    padding: 3px;
    border-top-left-radius: 4px;
    border-bottom-right-radius: 4px;
    font-size: 0.8em;
}

#statusMsg.error {
    background: #FFCCAA;
    border: 1px solid #FF3334;
}


    #statusMsg span {
        margin: 0 1px;
        text-decoration: underline;
        cursor: pointer;
    }


/********************************/
/************ Misc **************/
/********************************/

.header {
    padding: 10px;
    background-color: #f1f1f1;
    border-bottom: 1px #E5E5E5 solid;
}

.footer {
    border-top: 1px #E5E5E5 solid;
    background-color: #f1f1f1;
    font-size: 0.8em;
    height: 24px;
}

.button {
    user-select: none;
    border-radius: 2px;
    cursor: default;
    font-weight: bold;
    text-align: center;
    height: 27px;
    line-height: 27px;
    outline: 0;
    padding: 0 15px;
    text-transform: uppercase;
    font-size: 0.8em;
    border: 1px solid #C6C6C6;
    color: #444;
    background-image: -webkit-linear-gradient(top,#F8F8F8,#ECECEC);
    display: inline-block;
}

    .button:hover {
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
        background-image: -webkit-linear-gradient(top, #f9f9f9 , #e3e3e3);
        border: 1px solid rgba(0, 0, 0, 0.3);
        cursor: pointer;
    }

    .button:active {
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
    }

        .button.left {
            float:left;
        }

        .button.right {
            float:right;
        }

        .button.ico {
            background-repeat: no-repeat, repeat;
            background-position: center center;
            width: 14px;
        }

        .button.pressed, .button.pressed:hover {
            background-image: -webkit-linear-gradient(top, #EEE, #E0E0E0);
            background-color: #E0E0E0;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
            border-color: #ccc;
        }

        .button.red {
            border: 1px solid transparent;
            background-color: #D14836;
            background-image: -webkit-linear-gradient(top, #DD4B39, #D14836);
            color: white;
            font-weight: bold;
        }

            .button.red:hover {
                background-color: #C53727;
                background-image: -webkit-linear-gradient(top, #DD4B39, #C53727);
                border: 1px solid #B0281A;
                border-bottom-color: #AF301F;
            }

            .button.red:active {
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
                background-color: #B0281A;
                background-image: -webkit-linear-gradient(top, #DD4B39, #B0281A);
                border: 1px solid #992A1B;
            }

        .button.blue {
            border: 1px solid #3079ED;
            background-color: #4D90FE;
            background-image: -webkit-linear-gradient(top, #4D90FE,#4787ED);
            color: white;
        }

            .button.blue:hover {
                background-color: #357AE8;
                background-image: -webkit-linear-gradient(top, #4D90FE, #357AE8);
                border: 1px solid #2F5BB7;
            }

            .button.blue:active {
                box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
            }

        .button.dropdown { background-image: url('../img/dropdown.png'), -webkit-linear-gradient(top,#F8F8F8,#ECECEC); }
            .button.dropdown.pressed { background-image: url('../img/dropdown.png'), -webkit-linear-gradient(top, #EEE, #E0E0E0); }
        .button.refresh { background-image: url('../img/reload.png'), -webkit-linear-gradient(top,#F8F8F8,#ECECEC); }
        .button.back { background-image: url('../img/back.png'), -webkit-linear-gradient(top,#F8F8F8,#ECECEC); }
        .button.options { background-image: url('../img/edit.png'), -webkit-linear-gradient(top,#F8F8F8,#ECECEC); }
        .button.save {}
            .button.save.processing { background-image: url('../img/loaderRed.gif'), -webkit-linear-gradient(top,#DD4B39,#D14836); }

        .button.new {
            margin-right: 10px;
        }

        .button.authorize {
            margin-right: 8px;
        }

.dropdownMenu {
    position: absolute;
    right: 10px;
    top: 39px;
    transition: opacity 0.218s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.dropdownMenu, .dropdownMenuNested {
    display: none;
    background: white;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 3;
}

    .dropdownMenu .option {
        color: #333;
        padding: 6px 8px;
        cursor: pointer;
    }

    .dropdownMenuNested .option {
        padding-left: 16px;
    }

    .dropdownMenu .option:hover, .dropdownMenu .option.active{
        background-color: #eee;
    }

    .dropdownMenu .option.active{
        font-weight: bold;
    }

.inputWrap {
    overflow: hidden;
    padding: 0 10px;
}

.clearfix { zoom: 1 }
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }